<template>
    <div>
<!--  客户基本信息页面      -->
        <!--布局容器Main开始-->
        <el-card style="height: 450px">
            <el-descriptions title="基本信息" >

                <el-divider></el-divider>
                <!--分割线-->
                <el-descriptions-item label="用户ID">{{user.userId}}</el-descriptions-item>
                <el-descriptions-item label="昵称">{{user.nickname}}</el-descriptions-item>
                <el-descriptions-item label="性别">{{user.gender}}</el-descriptions-item>
                <el-descriptions-item label="姓名" >{{user.userName}}</el-descriptions-item>
                <el-descriptions-item label="身份证号">{{user.idNum}}</el-descriptions-item>
                <el-descriptions-item label="手机号">{{user.tel}}</el-descriptions-item>

            </el-descriptions>
        </el-card>
        <!--布局容器Main结束-->
    </div>
</template>

<script>
    export default {
        data() {
            return {
                unLogin:true,
                user:{
                    userId:'',
                    nickname:'',
                    gender:'',
                    userName:'',
                    idNum:'',
                    tel:''
                }
            };
        },
        methods: {
            loadCustomerInfo(){
                console.log("loadCustomerInfo....");
                let url='http://localhost:9080/customercenter/info';
                console.log('url='+url);
                this.axios.get(url).then((response)=>{
                    let responseBody=response.data;
                    if(responseBody.state==20000){
                        this.user=responseBody.data;
                    }
                });
            },
        },
        created() {
            console.log("开始执行created方法");

        },
        mounted() {
            console.log("开始执行mounted方法");
            this.loadCustomerInfo();
        }
    }
</script>
